package person;

import java.util.Scanner;

class Person{
    String name;
    private int age;

    public void setAge(int n){
        if(n>0 && n<130){
            age = n;
        }
        else
            System.out.println("输入不合法年龄");
    }

    public int getAge(){
        return age;
    }
}

public class PersonTest {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        Person p1 = new Person();
        p1.name = reader.next();
        p1.setAge(122);
        System.out.println(p1.name+"的年龄是"+p1.getAge());
    }
}
